// import { create } from 'zustand';

// const useAppStore = create<{ formVerId?: string }>((set) => ({
//   formVerId: undefined,

//   setFormVerId: (vId) => {
//     set(() => ({ formVerId: vId }));
//   },
// }));

// export { useAppStore };

import { proxy, useSnapshot } from 'valtio';
import { PluginFactory } from './common/setup';

interface AppStateInterface {
  formVerId?: string;
  factory?: PluginFactory;
  pgroupId?:string;
}
const appState = proxy<AppStateInterface>({
  formVerId: undefined,
  factory: undefined,
  pgroupId: undefined
});

export default appState;
